<div class="navbar navbar-static-top">
  <div class="navbar-inner">
    <div class="container">
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="brand" href="index.html">Invia</a>

      <div class="nav-collapse">
        <ul class="nav pull-left">
          
          {% for key, value in menuList %}
          <li class="active dropdown">
            <a href="" class="dropdown-toggle">{{ value.name_mn }}</a>
            {% if value.child is null %}
            {% else %}
            <ul class="dropdown-menu">
              {% for chaildKey, childValue in value.child %}   
                <li><a href="{{childValue.slug}}">{{ childValue.name_mn }}</a></li>
              {% endfor %}              
            </ul>
            {% endif %}
          </li>
          {% else %}
            {% if value.roles in userRoles %}
              <li><a href="{{value.slug}}">{{ value.name_mn }}</a>
              {% if value.child is null %}
              {% else %}
              <ul class="dropdown-menu">
                {% for childKey, childValue in value.child %}          
                    <li><a href="{{childValue.slug}}">{{ childValue.name_mn }}</a></li>          
                {% endfor %}
              </ul>
              {% endif %}
              </li>
          {% endif %}      
          {% endfor %}
         
        </ul>
      </div>
      <!-- / nav-collapse -->
      <ul class="menuIcon pull-right">
        <li class="ico-alert"><a href="www.facebook.com">facebook</a></li>
        <li class="facebook"><a href="www.twitter.com">twitter</a></li>
        <li class="search"><a href="#">search</a></li>
      </ul>
    </div>
  </div>
</div>